home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Determining the length of an int in string form
- Date: Fri, 29 Mar 96 23:15:52 GMT
- Organization: none
- Message-ID: <828141352snz@genesis.demon.co.uk>
- References: <3156D7BD.90D@oc.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <3156D7BD.90D@oc.com> lfw@oc.com "Larry Weiss" writes:
-
- >Lawrence Kirby wrote:
- > >
- > > In article <3155E067.3261@iadfw.net> lfw@iadfw.net "Larry Weiss" writes:
- > > >Now what I'd really like to see in the next revision of the standard
- > library
- > > >would be an snprintf() with the extra argument to declare only so many
- > > >writeable chars in the buffer, and a return code to indicate logical
- > > >attempts to write beyond that limit.
- > >
- > > Indeed, a return value indicating how many characters would have been
- > > written to the buffer if it were large enough.
- > >
- >
- >That would be great! That way you could specify zero chars available
- >if you just wanted to learn how many to allocate ideally for the real event.
-
- Or have a buffer you used for many calls to snprintf and which you could
- dynamically extend when it was too small.
-
- >Do implementations of snprintf() exist today that could be held up
- >as prior-art?
-
- I don't know of any offhand.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-